package com.king.headline.util;

import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;

/**
 * Created by king on 2016/6/26.
 */
public class MyTextUtils {

    public void setText(TextView tv,String text){
        if (tv!=null) {
            if (TextUtils.isEmpty(text)) {
                tv.setVisibility(View.GONE);
            } else {
                tv.setVisibility(View.VISIBLE);
                tv.setText(text);
            }
        }
    }

}
